package buffered;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class BufferedTest {
	public static void main(String[] args) throws IOException {
		/*FileWriter fw = new FileWriter("a.txt",true);
		fw.write("aaaaaaaaa\r");
		fw.write("hello word\r");
		fw.flush();
		fw.close();*/
		FileReader fr = new FileReader("a.txt");
		BufferedReader bf = new BufferedReader(fr);
		String str;
		while((str = bf.readLine()) != null){
			System.out.println(str);
		}
		bf.close();
		fr.close();
	}
}
